package com.ludomancy.starwave;

import java.awt.Graphics;
import java.awt.Image;

import com.ludomancy.gamelib.ResourceManager;


public class ArmoredFighterShip extends Ship
{
	
	public ArmoredFighterShip(Player owner, int px, int py)
	{
		super(owner, px, py);
		type = FIA;
		hull = 2.0;
	}

	public String getDescription()
	{
		return "Armored fighter can take 2 hits";
	}

	public void paintInYard(Graphics g, int x, int y)
	{
		Image image = ResourceManager.getImage(hull > 1.0 ? "armored.png" : "armored-struck.png");
		g.drawImage(image, x, y, null);
	}

	public boolean isMover()
	{
		return true;
	}

	protected boolean canMove()
	{
		return canMoveHere(px+owner.direction, py);
	}

}
